<case value="kindeditor">
    <textarea name="{$[type]form.name}" id="[type]{$group_k}_kindeditor_{$[type]k}" class="form-control" {$[type]form.extra_attr}>
        {$[type]form.value}
    </textarea>
    <script type="text/javascript" src="__PUBLIC__/libs/kindeditor/kindeditor-min.js" charset="utf-8"></script>
    <script type="text/javascript">
        $(function(){
            KindEditor.ready(function(K) {
                kindeditor_{$[type]k} = K.create('#[type]{$group_k}_kindeditor_{$[type]k}', {
                    allowFileManager : true,
                    filePostName : 'file',
                    width : '100%',
                    height : '500px',
                    cssPath : [
                        '__PUBLIC__/libs/bootstrap/dist/css/bootstrap.min.css',
                        '__PUBLIC__/libs/kindeditor/plugins/code/prettify.css'
                    ],
                    resizeType: 1,
                    pasteType : 2,
                    urlType : 'absolute',
                    fileManagerJson : '{:U(C("MODULE_MARK")."/Upload/fileManager")}',
                    uploadJson : '{:U(C("MODULE_MARK")."/PublicUpload/upload")}',
                    remoteImgSaveUrl: '{:U(C("MODULE_MARK")."/Upload/downremoteimg")}',
                    extraFileUploadParams: {
                        session_id : '{:session_id()}'
                    },
                    afterBlur: function(){this.sync();},
                    autoSaveMode:true,
                    autoSaveInterval:100,
                    afterCreate: function() {
                        this.loadPlugin('autosave');
                    }
                });
            });
        });
    </script>
</case>